The present invention relates generally to the field of managing documents in a distributed system, and more particularly to a method of and system of managing documents in a distributed system that may be bandwidth constrained.
In a document based database system, such as Lotus Notes(trademark), functionality is provided for users to replicate, i.e. have local copies of, documents from the document server. The user can read or update documents locally and then synchronize the changes back to the document server. This functionality enables a disconnected user to be able to use documents locally. This is a performance benefit for the user since document access is faster due to the document being stored locally. However, this benefit is not achieved without also having some problems.
One of problems associated with document management systems of the prior art is maintaining the synchronization of documents. If multiple users replicate the same document and more than one of the users make changes to the document, when they send the changed documents back to the server, there will be conflicts. Currently, Lotus Notes(trademark) deals with this problem by saving each conflict as a different document and then allowing an administrator, or user, to resolve the conflicts and merge the data into one document.
In environments, such as a LAN or WAN, where all users have a high bandwidth connection to the server, the users can access and edit a document directly on the server. Thus, in such environment, users do not have the local replication and conflict problem. Users can have a xe2x80x9csave conflictxe2x80x9d problem if two users edit the same document at the same time. In environments where users have no connectivity, i.e. they connect to the LAN, replicate the document, and then disconnect, the local replication and conflict problem cannot be addressed because the various user client machines have no way to be aware of each other.
In systems that have limited bandwidth connectivity, such as radio frequency (RF) networks frequently found in a mobile work environments such as law enforcement, the prior art requires a choice between avoiding conflicts by accessing the server directly, or using replication to bring down documents locally. In a limited bandwidth environment, direct access to the server provides unacceptable performance. Local replication provides improved performance, but it leads to conflicts for documents that have been edited by more than one user.
It is an object of the present invention to overcome the shortcomings of the prior art by providing a system and method by which users can have documents locally so as to have improved performance, and at the same time protect against users editing the same documents at the same time and causing conflicts.
The present invention provides a method of and system for managing documents in a distributed computing environment, which may be bandwidth limited. The system of the present invention includes a document locker server and a document locker client. The document locker client monitors user interaction with a version of a document locally replicated from a document server. Whenever the user attempts interaction with the document, such as editing or performing a workflow action, which would change said document, the document locker client requests a lock for the document from the document locker server. The document locker server grants a lock if the document is not already locked by another user and the document locally replicated is the latest version of the document. The document locker client allows the user to perform the operation if a lock is received.
The document locker client requests a lock by sending a lock request to the document locking server. The lock request includes a document identifier and a version identifier. The document locker server determines if the document is already locked by another user by checking a locked document table. The locked document table includes, for each locked document, a document identifier, a version identifier, a lock identifier, and the user by whom said document is locked. If the document is already locked by another user, the document locker server sends a xe2x80x9cdocument locked by another userxe2x80x9d reply to the document locker client. The document already checked reply may include the identity of the user to whom the document is checked out.
If the document is not already locked by another user, the document locker server determines if the version of the document locally replicated is the same as the version stored on the document server. If the version of the document stored on the document server is newer than the version locally replicated, the document locker server informs the user that a newer version of the document exists, the document locker client prompts the user to replicate the newer version from the document server. If the version of the document locally replicated is the same as the version stored on the document server, the document locker server locks the document by sending a xe2x80x9clock grantedxe2x80x9d reply to the document locker client and making an entry for the document in the locked document table. Thus, if the user already has the latest version of the document, the system does not replicate another copy of the document to the local host. The lock granted reply includes a unique lock identifier and the entry in the locked document table includes the lock identifier. The document locker client inserts the lock identifier into the locally replicated document.
The document locker server unlocks documents when a locked document is sent back to the document server. Periodically, the document locker server compares lock identifiers for the documents in the document locker server against the lock identifiers inserted in the versions of the documents stored on the document server. If the lock identifier in a document stored on the server is the same as the lock identifier in the locked document table, the document locker server deletes the entry for the document in the locked document table.